package tech.aistar.service;

import com.github.pagehelper.PageInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import tech.aistar.dto.AgentGrade;
import tech.aistar.entity.Agent;

import java.util.List;


public interface IAgentService {
    List<Agent> selectAll();

    List<AgentGrade> selectAgent();

    List<AgentGrade> selectAgentByName(String name);

    PageInfo<AgentGrade> findByPage(String name, Integer pageNow, Integer pageSize);
    void insert(Agent agent);
    void  updateByPrimaryKey(Agent agent);
    void deleteByPrimaryKey(Integer id);


    Agent selectById(Integer id);

    int updatephoneById(String phone,Integer id);

    int updateNameById(String name,Integer id);

    int updategenderById(String gender,Integer id);

    int updateIdentityById(String identityCardNumber,String name,String gender,Integer id);

    Agent selectByregisterId(Integer registerId);


    @Insert("insert into agent(register_id,identity) value(#{registerId},'1')")
    void insertById(Integer registerId);

    int updatephotographById(String photograph,Integer agentId);
}
